package com.ysh.contentcenter.feignclient;

import com.ysh.contentcenter.domain.dto.user.UserDTO;
import com.ysh.contentcenter.feignclient.fallback.UserCenterFeignClientFallback;
import com.ysh.contentcenter.feignclient.fallbackFactory.UserCenterFeignClientFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//@FeignClient(name="user-center",configuration = UserCenterFeignConfiguration.class)
@Component
@FeignClient(name="user-center"
//        ,fallback = UserCenterFeignClientFallback.class
        ,fallbackFactory = UserCenterFeignClientFactory.class
)
public interface UserCenterFeignClient {
    @GetMapping("/users/{id}")
    UserDTO findById(@PathVariable Integer id);
}
